/**
 * Created by yqj on 2017/1/19.
 */
import Vue from 'vue'
import Router from 'vue-router'
import loginView from '../components/login/Login.vue'
import mainView from '../components/home/Home.vue'
import userManagementView from '../components/userManagement/UserManagement.vue'
import contentManagementView from '../components/contentManagement/contentManagement.vue'
import labelManagementView from '../components/labelManagement/labelManagement.vue'
import classifyManagementView from '../components/classifyManagement/classifyManagement.vue'
import checkBaseInfoView from '../components/checkBaseInfo/checkBaseInfo.vue'
import checkContentView from '../components/checkContent/checkContent.vue'
import enteringContentView from '../components/enteringContent/enteringContent.vue'
import teacherEnteringView from '../components/teacherEntering/teacherEntering.vue'
import checkAnalysisView from '../components/checkAnalysis/checkAnalysis.vue'
import statisticsView from '../components/statistics/statistics.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  scrollBehavior: () => ({y: 0}),
  routes: [
    {
      path: '/',
      component: loginView
    },
    {
      path: '/login',
      component: loginView
    },
    {
      path: '/main',
      component: mainView,
      children: [
        { path: 'userManagement', component: userManagementView },
        { path: 'contentManagement', component: contentManagementView },
        { path: 'labelManagement', component: labelManagementView },
        { path: 'classifyManagement', component: classifyManagementView },
        { path: 'checkBaseInfo', component: checkBaseInfoView },
        { path: 'checkContent', component: checkContentView },
        { path: 'enteringContent', component: enteringContentView },
        { path: 'teacherEntering', component: teacherEnteringView },
        { path: 'checkAnalysis', component: checkAnalysisView },
        { path: 'statistics', component: statisticsView }
      ]
    }
  ]
})
